'----------------------------------------------
' Name: Ali Karbassi & Jeremy Nieto
' Date: February 26, 2007
' Description: Project 3
'              Form Prog3
'----------------------------------------------

Imports System.Windows.Forms
Imports UWPCS3340
Public Class Prog3

   Dim tempForm As formForHouse
   Dim n As Integer = 0
   Dim houseList As ArrayList

   ''' <summary>
   ''' Cascades the open windows.
   ''' </summary>
   ''' <param name="sender"></param>
   ''' <param name="e"></param>
   ''' <remarks></remarks>
   Private Sub btnCascade_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles _
   btnCascade.Click

      Me.LayoutMdi(MdiLayout.Cascade)

   End Sub

   ''' <summary>
   ''' Horizontally tiles the open windows.
   ''' </summary>
   ''' <param name="sender"></param>
   ''' <param name="e"></param>
   ''' <remarks></remarks>
   Private Sub btnTileHorizontal_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles _
   btnTileHorizontal.Click

      Me.LayoutMdi(MdiLayout.TileHorizontal)

   End Sub

   ''' <summary>
   ''' Vertically tiles the open windows.
   ''' </summary>
   ''' <param name="sender"></param>
   ''' <param name="e"></param>
   ''' <remarks></remarks>
   Private Sub btnTileVertical_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles _
   btnTileVertical.Click

      Me.LayoutMdi(MdiLayout.TileVertical)

   End Sub

   ''' <summary>
   ''' Arranges the icons of the open windows.
   ''' </summary>
   ''' <param name="sender"></param>
   ''' <param name="e"></param>
   ''' <remarks></remarks>
   Private Sub btnArrangeIcons_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles _
   btnArrangeIcons.Click

      Me.LayoutMdi(MdiLayout.ArrangeIcons)

   End Sub

   ''' <summary>
   ''' Exits the application.
   ''' </summary>
   ''' <param name="sender"></param>
   ''' <param name="e"></param>
   ''' <remarks></remarks>
   Private Sub btnExit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnExit.Click

      Application.Exit()

   End Sub

   ''' <summary>
   ''' Creates a new instance of formForHouse. Incriments the number.
   ''' </summary>
   ''' <param name="sender"></param>
   ''' <param name="e"></param>
   ''' <remarks></remarks>
   Private Sub btnNew_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnNew.Click

      n += 1
      tempForm = New formForHouse
      tempForm.Text = "Prog3 (" & n & ")"
      tempForm.MdiParent = Me
      tempForm.Show()

   End Sub

   ''' <summary>
   ''' Sets the date.
   ''' </summary>
   ''' <param name="sender"></param>
   ''' <param name="e"></param>
   ''' <remarks></remarks>
   Private Sub Prog3_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

      lblDate.Text = Now

   End Sub

   ''' <summary>
   ''' Updates the date.
   ''' </summary>
   ''' <param name="sender"></param>
   ''' <param name="e"></param>
   ''' <remarks></remarks>
   Private Sub Timer_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer.Tick

      lblDate.Text = Now

   End Sub

End Class
